#include "Progress.h"


char state[] = "|/-\\";
void progress(){
    int rate = 0;
    char bar[SIZE];
    int len =strlen(state);
    memset(bar,'\0',sizeof(bar));
    while(rate <= 100) {
        printf("[%-100s][%d%%][%c]\r",bar,rate,state[rate%len]);
        fflush(stdout);
        usleep(PAUSE_TIME);
        bar[rate++] = symbol;
    }
    printf("\n");
}
